<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ page import="fy.bean.*,java.util.*,java.io.*" %>
<%
request.setCharacterEncoding("utf-8");
String title = request.getParameter("title");
String category = request.getParameter("category");
int homepage = Integer.parseInt(request.getParameter("homepage")); 
String source = request.getParameter("source");
String content = request.getParameter("data");
String picture = request.getParameter("picture");
String author = request.getParameter("author");
int id = Integer.parseInt(request.getParameter("id"));
String txtDate = request.getParameter("txtDate");
String categoryname = request.getParameter("categoryname");
int puton = Integer.parseInt(request.getParameter("puton")); 

System.out.println(txtDate);
System.out.print("updata.jsp : id:"+id+"+category :"+category +"+homepage :"+homepage+"+source :"+source
		+"+picture :"+picture+"+author :"+author+"+title :"+title+"+puton :"+puton);
System.out.println("content" + content);
NewsBean newsBean = new NewsBean();
    if(newsBean.doUpdata(category, title, content, homepage, picture, author, source,txtDate,puton,categoryname,id)){
    	
	}else{
		response.setCharacterEncoding("utf-8");
		PrintWriter pout = response.getWriter();
		pout.print("<script>alert('不成功'); window.location='../useradmin.jsp' </script>");
		pout.flush();
		pout.close();
		//response.sendRedirect("login.html");
	};

%>